//package com.info.zhiduoduo.admin.service;
//
//import com.baomidou.mybatisplus.mapper.Condition;
//import com.google.common.collect.Lists;
//import com.info.zhiduoduo.admin.model.dto.account.MakerAmountDto;
//import com.info.zhiduoduo.admin.model.formbean.maker.TestTaxFeeFormBean;
//import com.info.zhiduoduo.admin.model.formbean.project.DelTestDataFormBean;
//import com.info.zhiduoduo.common.configs.CommonConfig;
//import com.info.zhiduoduo.common.configs.PayConfig;
//import com.info.zhiduoduo.common.configs.UploadPathConfig;
//import com.info.zhiduoduo.common.configs.ZddUrlConfig;
//import com.info.zhiduoduo.common.constants.Constants;
//import com.info.zhiduoduo.common.constants.SmartResult;
//import com.info.zhiduoduo.common.constants.StatusMsg;
//import com.info.zhiduoduo.common.constants.company.CompanyPayType;
//import com.info.zhiduoduo.common.constants.crowdsource.CrowdsourceProjectType;
//import com.info.zhiduoduo.common.constants.crowdsource.CrowdsourceUserType;
//import com.info.zhiduoduo.common.constants.project.CalcAmountType;
//import com.info.zhiduoduo.common.constants.project.CompanyProjectState;
//import com.info.zhiduoduo.common.exception.SmartException;
//import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;
//import com.info.zhiduoduo.common.utils.ContextUtil;
//import com.info.zhiduoduo.common.utils.DateUtil;
//import com.info.zhiduoduo.common.utils.FileUtil;
//import com.info.zhiduoduo.common.utils.RandomUtil;
//import com.info.zhiduoduo.common.utils.seal.SealUtil;
//import com.info.zhiduoduo.core.dto.taxer.TaxerInvoiceServiceChargeDto;
//import com.info.zhiduoduo.core.formbean.CalcProjectChargesFormBean;
//import com.info.zhiduoduo.core.formbean.ProjectCheckFormBean;
//import com.info.zhiduoduo.core.service.CoreProjectService;
//import com.info.zhiduoduo.core.service.CoreTaxerService;
//import com.info.zhiduoduo.core.service.CrowdsourceProjectService;
//import com.info.zhiduoduo.core.service.WxMessageService;
//import com.info.zhiduoduo.core.service.ZhiduoduoProjectService;
//import com.info.zhiduoduo.core.service.common.BaseService;
//import com.info.zhiduoduo.repository.dto.crowdsource.CrowdsourceItemAmountCalcResult;
//import com.info.zhiduoduo.repository.dto.crowdsource.CrowdsourceProjectItemModel;
//import com.info.zhiduoduo.repository.dto.maker.MakerDetailDto;
//import com.info.zhiduoduo.repository.dto.maker.StudioDetailDto;
//import com.info.zhiduoduo.repository.dto.project.CalcProjectChargesDto;
//import com.info.zhiduoduo.repository.dto.project.TestTaxFeeDto;
//import com.info.zhiduoduo.repository.dto.quota.CompanyQuotaDto;
//import com.info.zhiduoduo.repository.dto.quota.CrowdsourceCityQuotaDto;
//import com.info.zhiduoduo.repository.dto.quota.MakerQuotaDto;
//import com.info.zhiduoduo.repository.dto.quota.ZhiduoduoCityQuotaDto;
//import com.info.zhiduoduo.repository.entity.company.Company;
//import com.info.zhiduoduo.repository.entity.company.CompanyAccount;
//import com.info.zhiduoduo.repository.entity.company.CompanyProject;
//import com.info.zhiduoduo.repository.entity.crowdsource.CrowdsourceProject;
//import com.info.zhiduoduo.repository.entity.crowdsource.CrowdsourceProjectItem;
//import com.info.zhiduoduo.repository.entity.maker.Maker;
//import com.info.zhiduoduo.repository.entity.maker.MakerStudio;
//import com.info.zhiduoduo.repository.entity.quota.CityConfig;
//import com.info.zhiduoduo.repository.entity.taxer.TaxerInvoice;
//import com.info.zhiduoduo.repository.entity.taxer.TaxerPayment;
//import com.info.zhiduoduo.repository.mapper.company.CompanyProjectMapper;
//import com.info.zhiduoduo.repository.mapper.crowdsource.CrowdsourceProjectItemMapper;
//import com.info.zhiduoduo.repository.mapper.crowdsource.CrowdsourceProjectMapper;
//import com.info.zhiduoduo.repository.mapper.crowdsource.CrowdsourceTradeRecordItemMapper;
//import com.info.zhiduoduo.repository.mapper.crowdsource.CrowdsourceTradeRecordMapper;
//import com.info.zhiduoduo.repository.mapper.entrustmentproject.EntrustmentProjectItemMapper;
//import com.info.zhiduoduo.repository.mapper.invoice.InvoiceMapper;
//import com.info.zhiduoduo.repository.mapper.maker.MakerBankcardMapper;
//import com.info.zhiduoduo.repository.mapper.maker.MakerStudioMapper;
//import com.info.zhiduoduo.repository.mapper.order.TradeRecordMapper;
//import com.info.zhiduoduo.repository.mapper.partner.PartnerBrokerageMapper;
//import com.info.zhiduoduo.repository.mapper.partner.PartnerCompanyMapper;
//import com.info.zhiduoduo.repository.mapper.quota.CityConfigMapper;
//import com.info.zhiduoduo.repository.mapper.quota.CompanyQuotaMapper;
//import com.info.zhiduoduo.repository.mapper.quota.CrowdsourceCityQuotaMapper;
//import com.info.zhiduoduo.repository.mapper.quota.MakerQuotaMapper;
//import com.info.zhiduoduo.repository.mapper.quota.ZhiduoduoCityQuotaMapper;
//import com.info.zhiduoduo.repository.mapper.system.ProjectCategoryMapper;
//import com.info.zhiduoduo.repository.mapper.taxer.TaxerInvoiceMapper;
//import com.info.zhiduoduo.repository.mapper.taxer.TaxerPaymentMapper;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;
//
//import java.io.File;
//import java.math.BigDecimal;
//import java.text.SimpleDateFormat;
//import java.util.Date;
//import java.util.List;
//
//import javax.annotation.Resource;
//import javax.validation.Valid;
//
//@Service
//public class TestProjectService extends BaseService {
//
//	@Autowired
//	CoreTaxerService coreTaxerService;
//	@Autowired
//	MakerService makerService;
//	@Autowired
//	WxMessageService wxMessageService;
//	@Autowired
//	CoreProjectService coreProjectService;
//	@Autowired
//	ZhiduoduoProjectService zhiduoduoProjectService;
//	@Autowired
//	CrowdsourceProjectService crowdsourceProjectService;
//	@Autowired
//	ZzFixService zzFixService;
//
//	@Autowired
//	CompanyProjectMapper projectMapper;
//	@Autowired
//	ProjectCategoryMapper projectCategoryMapper;
//	@Autowired
//	PartnerCompanyMapper partnerCompanyMapper;
//	@Autowired
//	PartnerBrokerageMapper partnerBrokerageMapper;
//	@Autowired
//	MakerStudioMapper makerStudioMapper;
//	@Autowired
//	TradeRecordMapper tradeRecordMapper;
//	@Autowired
//	CrowdsourceTradeRecordMapper crowdsourceTradeRecordMapper;
//	@Autowired
//	CrowdsourceTradeRecordItemMapper crowdsourceTradeRecordItemMapper;
//	@Autowired
//	CrowdsourceProjectMapper crowdsourceProjectMapper;
//	@Autowired
//	CrowdsourceProjectItemMapper crowdsourceProjectItemMapper;
//	@Autowired
//	InvoiceMapper invoiceMapper;
//	@Autowired
//	MakerBankcardMapper makerBankcardMapper;
//	@Autowired
//	TaxerInvoiceMapper taxerInvoiceMapper;
//	@Autowired
//	TaxerPaymentMapper taxerPaymentMapper;
//	@Autowired
//	EntrustmentProjectItemMapper entrustmentProjectItemMapper;
//	@Resource
//	MakerQuotaMapper makerQuotaMapper;
//	@Resource
//	CompanyQuotaMapper companyQuotaMapper;
//	@Resource
//	ZhiduoduoCityQuotaMapper zhiduoduoCityQuotaMapper;
//	@Resource
//	CrowdsourceCityQuotaMapper crowdsourceCityQuotaMapper;
//	@Resource
//	CityConfigMapper cityConfigMapper;
//
//	@Autowired
//	PayConfig payConfig;
//	@Autowired
//	ZddUrlConfig zddUrlConfig;
//	@Autowired
//	CommonConfig commonConfig;
//	@Autowired
//	UploadPathConfig uploadPathConfig;
//
//	@Transactional
//	public SmartResult testTransactional() {
//		int userid = zzFixService.insertMaker();
//		Maker maker = new Maker().selectById(userid);
//		MakerDetailDto makerDetailDto = handleTest(userid);
//		throw SmartException.of(StatusMsg.StatusMsg_199);
//		// return SmartResult.success();
//	}
//
//	private MakerDetailDto handleTest(int userid) {
//		return makerService.getUserInfo(userid);
//	}
//
//	/**
//	 * 测试项目服务费和税金
//	 *
//	 * @param formBean
//	 * @return
//	 */
//	@Transactional
//	public SmartResult<TestTaxFeeDto> testCalcStudioTaxFee(BaseSimpleFormBean<TestTaxFeeFormBean> formBean) {
//		if (ContextUtil.isProd()) return SmartResult.fail(StatusMsg.StatusMsg_199);
//		TestTaxFeeFormBean reqdata = formBean.getReqdata();
//		int userid = reqdata.getUserid();
//		StudioDetailDto makerStudio = makerStudioMapper.getStudioDetail(userid);
//		if (makerStudio == null) return SmartResult.ofErrorParam();
//
//		BigDecimal dealAmount = reqdata.getDealAmount();
//		int invoicetype = reqdata.getInvoicetype();
//		Date projectfinish = reqdata.getProjectfinish();
//		int payType = reqdata.getPayType();
//		if (projectfinish == null) projectfinish = new Date();
//
//		List<TestTaxFeeDto> list = Lists.newArrayList();
//		for (int i = 0; i < reqdata.getCount(); i++) {
//			CompanyProject project = new CompanyProject().setCompid(64)
//					.setUserid(userid)
//					.setProjectname("测试服务费和税金的项目 " + DateUtil.getNowTimeString())
//					.setProjectamount(dealAmount)
//					.setProjectdealamount(dealAmount)
//					.setInvoicetype(invoicetype)
//					.setPayType(payType)
//					.setState(CompanyProjectState.CHECKING)
//					.setProjectstart(projectfinish)
//					.setProjectcheckstart(projectfinish)
//					.setProjectcheckend(projectfinish)
//					.setProjectfinish(projectfinish)
//					.setAutoCheck(1);
//			project.insert();
//
//			project = new CompanyProject().selectById(project.getProjectid());
//
//			if (CompanyPayType.isZddPlatformOnlinePayType(payType)) {
//				new CompanyAccount().setPayType(payType).update(Condition.create().eq("compid", project.getCompid()));
//
//				//判断当前创客所有进行中，已完成的项目总金额是否已经超过了创客的限额，超过则发布失败
//				coreProjectService.checkMakerQuota(project.getCompid(), project.getUserid(), project.getProjectid(), project.getType(), project.getProjectamount(), CalcAmountType.CHECKED);
//
//				zhiduoduoProjectService.publishProject(project);
//				project.setState(CompanyProjectState.CHECKED).updateById();
//				CalcProjectChargesFormBean calcformBean = CalcProjectChargesFormBean.of(project, CalcAmountType.CHECKED);
//				CalcProjectChargesDto chargesDto = coreProjectService.calcProjectCharge(calcformBean);
//
//				project.setProjectBaseServiceRate(chargesDto.getBaseServiceRatio())
//						.setProjectservicecharge(chargesDto.getServiceCharge())
//						.setProjectPartnerServiceRate(chargesDto.getPartnerProjectServiceRatio())
//						.setProjectTaxRate(chargesDto.getTaxRatio())
//						.setProjecttaxfee(chargesDto.getTaxFee())
//						.setState(CompanyProjectState.COMPLETED)
//						.updateById();
//
//				// coreProjectService.handleUserProjectAccountFlow(project, 0);
//				// coreProjectService.handlePartnerBrokerage(project, 0, "");
//
//			} else if (payType == CompanyPayType.OWN_MERCHANT) {
//				new CompanyAccount().setPayType(payType).update(Condition.create().eq("compid", project.getCompid()));
//
//				CalcProjectChargesFormBean calcformBean = CalcProjectChargesFormBean.of(project, 0);
//				CalcProjectChargesDto chargesDto = coreProjectService.calcProjectCharge(calcformBean);
//
//				project.setProjectBaseServiceRate(chargesDto.getBaseServiceRatio())
//						.setProjectservicecharge(chargesDto.getServiceCharge())
//						.setProjectPartnerServiceRate(chargesDto.getPartnerProjectServiceRatio())
//						.setProjectTaxRate(chargesDto.getTaxRatio())
//						.setProjecttaxfee(chargesDto.getTaxFee())
//						.setState(CompanyProjectState.COMPLETED)
//						.updateById();
//			} else if (payType == CompanyPayType.OFFLINE_DIRECT) {
//
//				//线下流程, 直接调用
//				new CompanyAccount().setPayType(payType).update(Condition.create().eq("compid", project.getCompid()));
//				zhiduoduoProjectService.checkProject(new ProjectCheckFormBean().setProjectid(project.getProjectid()).setState(CompanyProjectState.CHECKED));
//
//			} else if (payType == CompanyPayType.PLATFORM_OFFLINE) {
//				// 九歌线下代付 支付方式
//				new CompanyAccount().setPayType(payType).update(Condition.create().eq("compid", project.getCompid()));
//				SmartResult smartResult = zhiduoduoProjectService.publishProject(project);
//				if (smartResult.isSuccessful()) {
//					mockPayJiugeOfflineProjectFinish(project);
//				}
//			}
//
//			project = new CompanyProject().selectById(project.getProjectid());
//			TestTaxFeeDto testTaxFeeDto = new TestTaxFeeDto().setProjectid(project.getProjectid())
//					.setProjectname(project.getProjectname())
//					.setInvoicetype(invoicetype)
//					.setProjectfinish(projectfinish)
//					.setTaxFee(project.getProjecttaxfee())
//					.setPayType(project.getPayType())
//					.setServiceCharge(project.getProjectservicecharge())
//					.setQuatarTotalAmount(coreProjectService.getUserQuarterTotalAmount(userid, CalcAmountType.ALL))
//					.setYearlyTotalAmount(coreProjectService.getUserYearlyTotalAmount(userid, CalcAmountType.ALL));
//
//			list.add(testTaxFeeDto);
//		}
//
//		return SmartResult.success(list);
//	}
//
//	/**
//	 * 生成智众包项目
//	 *
//	 * @param formBean
//	 * @return
//	 */
//	@Transactional
//	public SmartResult testCrowdsourceProject(BaseSimpleFormBean<TestTaxFeeFormBean> formBean) {
//		if (ContextUtil.isProd()) return SmartResult.fail(StatusMsg.StatusMsg_199);
//		int compid = formBean.getUserid();
//		@Valid TestTaxFeeFormBean reqdata = formBean.getReqdata();
//		int userid = reqdata.getUserid();
//		int count = reqdata.getCount();
//		BigDecimal dealAmount = reqdata.getDealAmount();
//		int invoicetype = reqdata.getInvoicetype();
//		int payType = reqdata.getPayType();
//		Company company = new Company().selectById(compid);
//		//确认企业的服务费率
//		Double baseTaxRate = company.getBaseTaxRate();
//		Double lowTaxRate = company.getLowTaxRate();
//		Double highTaxRate = company.getHighTaxRate();
//		Double projectServiceRate = company.getProjectServiceRate();
//		double partnerBrokerageRate = crowdsourceProjectService.getPartnerBrokerageRate(compid);
//
//		CrowdsourceProject project = new CrowdsourceProject().setCompid(compid)
//				.setPayType(payType)
//				.setProjectType(CrowdsourceProjectType.NORMAL)
//				.setCrowdsourceCity(company.getCrowdsourceCity())
//				.setState(Constants.CROWDSOURCE_PROJECT_PAYING)
//				.setProjectName("自动测试计算佣金服务费项目")
//				.setBaseTaxRate(baseTaxRate)
//				.setLowTaxRate(lowTaxRate)
//				.setHighTaxRate(highTaxRate)
//				.setProjectServiceRate(projectServiceRate)
//				.setPartnerBrokerageRate(partnerBrokerageRate);
//		project.insert();
//
//		List<TestTaxFeeDto> list = Lists.newArrayList();
//		for (int i = 0; i < count; i++) {
//			CrowdsourceProjectItemModel itemCalc = new CrowdsourceProjectItemModel();
//			itemCalc.setUserid(userid).setUserType(CrowdsourceUserType.STUDIO).setProjectAmount(dealAmount);
//			CrowdsourceItemAmountCalcResult itemAmount = crowdsourceProjectService.calcItemAmount(project, itemCalc, company, 0);
//			CrowdsourceProjectItem projectItem = new CrowdsourceProjectItem().setUserType(CrowdsourceUserType.STUDIO)
//					.setUserid(userid)
//					.setProjectid(project.getProjectid())
//					.setProjectAmount(itemAmount.getProjectAmount())
//					.setIntegratedTaxFee(itemAmount.getIntegratedTaxFee())
//					.setTaxRate(itemAmount.getTaxRate())
//					.setProjectServiceCharge(itemAmount.getProjectServiceCharge())
//					.setPartnerBrokerage(itemAmount.getPartnerBrokerage());
//			projectItem.insert();
//
//			TestTaxFeeDto testTaxFeeDto = new TestTaxFeeDto().setProjectid(project.getProjectid())
//					.setProjectname(project.getProjectName())
//					.setInvoicetype(invoicetype)
//					.setProjectfinish(projectItem.getCreatetime())
//					.setTaxFee(projectItem.getIntegratedTaxFee())
//					.setPayType(project.getPayType())
//					.setServiceCharge(projectItem.getProjectServiceCharge())
//					.setQuatarTotalAmount(coreProjectService.getUserQuarterTotalAmount(userid, CalcAmountType.ALL))
//					.setYearlyTotalAmount(coreProjectService.getUserYearlyTotalAmount(userid, CalcAmountType.ALL));
//			list.add(testTaxFeeDto);
//		}
//
//		// 支付
//		crowdsourceProjectService.refreshProjectDetail(project);
//		crowdsourceProjectService.payCrowdsourceProject(project, "");
//		return SmartResult.success(list);
//	}
//
//	public SmartResult delTestData(BaseSimpleFormBean<DelTestDataFormBean> formBean) {
//		if (ContextUtil.isProd()) return SmartResult.fail(StatusMsg.StatusMsg_199);
//		DelTestDataFormBean reqdata = formBean.getReqdata();
//		int userid = reqdata.getUserid();
//		int type = reqdata.getType();
//		int quarter = reqdata.getQuarter();
//		if (type == 0) {
//			projectMapper.delYearlyProjectData(userid);
//			crowdsourceProjectItemMapper.delYearlyProjectData(userid, 2);
//			entrustmentProjectItemMapper.delYearProjectData(userid);
//			deleteYearTaxerTestData(userid);
//		} else {
//			projectMapper.delQuarterProjectData(userid, quarter);
//			crowdsourceProjectItemMapper.delQuarterProjectData(userid, 2, quarter);
//			entrustmentProjectItemMapper.delQuarterProjectData(userid, quarter);
//			deleteQuarterTaxerTestData(userid, quarter);
//		}
//		return SmartResult.success();
//	}
//
//	private void mockPayJiugeOfflineProjectFinish(CompanyProject project) {
//		// 处理九歌线下支付成功
//		project.setReceiptimg("").setRemark("模拟九歌线下支付,直接确认支付成功").setOfflinePayAdminid(0).setOfflinePayTime(new Date()).setOfflinePayState(Constants.OFFLINE_PAID);
//		// 更新银行卡开户网点
//		zhiduoduoProjectService.getProjectPaymentService(project).doAfterPayUserTradeSucceed(project, null);
//	}
//
//	public List<TaxerInvoiceServiceChargeDto> testInvoiceServiceCharge(int userid, BigDecimal amount, int count) {
//		List<TaxerInvoiceServiceChargeDto> list = Lists.newArrayList();
//		MakerStudio studio = new MakerStudio().selectById(userid);
//		Company company = new Company().selectById(64);
//		for (int i = 0; i < count; i++) {
//			TaxerInvoice invoice = new TaxerInvoice().setUserid(userid)
//					.setUsername(studio.getUsername())
//					.setCompanyid(company.getCompid())
//					.setCompanyName(company.getCompname())
//					.setAmount(amount)
//					.setInvoiceType(1)
//					.setState(1);
//			invoice.insert();
//			TaxerPayment payment = new TaxerPayment().setUserid(userid).setInvoiceid(invoice.getInvoiceid()).setPayno(RandomUtil.createRandomNo("TEST_", "")).setType(3).setState(1);
//			payment.insert();
//			invoice.setPayid(payment.getPayid()).updateById();
//			TaxerInvoiceServiceChargeDto chargeDto = coreTaxerService.calcInvoiceServiceChargeV2(invoice.getInvoiceid());
//			// 修改状态为已支付
//			invoice.setState(2).setConfirmtime(new Date()).updateById();
//			payment.setState(2).setConfirmtime(new Date()).updateById();
//			list.add(chargeDto);
//		}
//		return list;
//	}
//
//	public void deleteQuarterTaxerTestData(int userid, int quarter) {
//		taxerInvoiceMapper.deleteQuarterData(userid, quarter);
//		taxerPaymentMapper.deleteQuarterData(userid, quarter);
//	}
//
//	public void deleteYearTaxerTestData(int userid) {
//		taxerInvoiceMapper.deleteYearData(userid);
//		taxerPaymentMapper.deleteYearData(userid);
//	}
//
//	public MakerAmountDto getMakerAmount(int userid, int compid, int calcAmountType, int year, int month) {
//		if (month == 0) month = DateUtil.getNowMonth();
//		int quarterOfMonth = DateUtil.getQuarterOfMonth(month);
//		BigDecimal userMonthlyTotalAmount = coreProjectService.getUserMonthlyTotalAmountByYearMonth(userid, calcAmountType, year, month);
//		BigDecimal userQuarterTotalAmount = coreProjectService.getUserQuarterTotalAmountByYearQuarter(userid, calcAmountType, year, quarterOfMonth);
//		BigDecimal userYearlyTotalAmount = coreProjectService.getUserYearlyTotalAmount(userid, calcAmountType, year);
//		BigDecimal userTwelveMonthTotalAmount = coreProjectService.getUserTwelveMonthTotalAmount(userid, calcAmountType, 0, 0);
//		BigDecimal userQuarterGenTotalAmount = coreProjectService.getUserQuarterGenTotalAmountByYearQuarter(userid, calcAmountType, year, quarterOfMonth);
//		BigDecimal userYearlyTotalAmountExcludeCrowdsource = coreProjectService.getUserYearlyTotalAmountExcludeCrowdsource(userid, calcAmountType, 0, 0);
//
//		// 各种限额
//		MakerQuotaDto makerQuotaDto = makerQuotaMapper.getByUserid(userid);
//		CompanyQuotaDto companyQuotaDto = companyQuotaMapper.getByCompid(compid);
//		MakerDetailDto userInfo = makerService.getUserInfo(userid);
//		Integer openingLocation = userInfo.getOpeningLocation();
//		ZhiduoduoCityQuotaDto zhiduoduoCityQuotaDto = zhiduoduoCityQuotaMapper.getByConfigId(openingLocation);
//
//		List<CrowdsourceCityQuotaDto> crowdsourceCityQuotaList = null;
//		CityConfig cityConfig = cityConfigMapper.findByCompid(compid);
//		if (cityConfig != null) {
//			crowdsourceCityQuotaList = crowdsourceCityQuotaMapper.listByConfigId(cityConfig.getId());
//		}
//
//		MakerAmountDto dto = new MakerAmountDto().setUserMonthlyTotalAmount(userMonthlyTotalAmount)
//				.setUserQuarterTotalAmount(userQuarterTotalAmount)
//				.setUserYearlyTotalAmount(userYearlyTotalAmount)
//				.setUserTwelveMonthTotalAmount(userTwelveMonthTotalAmount)
//				.setUserYearlyTotalAmountExcludeCrowdsource(userYearlyTotalAmountExcludeCrowdsource)
//				.setUserQuarterGenTotalAmount(userQuarterGenTotalAmount)
//				.setMakerQuota(makerQuotaDto)
//				.setCompanyQuota(companyQuotaDto)
//				.setZhiduoduoCityQuota(zhiduoduoCityQuotaDto)
//				.setCrowdsourceCityQuotaList(crowdsourceCityQuotaList);
//		return dto;
//
//	}
//
//	public SmartResult getElectronicSea(String name,String path){
//
//		Date date = new Date();
//		File sealPath = new File(uploadPathConfig.getUploadpath()+"/gz");
//
//		String compseal = name+ "_seal.png";
//		File compsealFile = new File(sealPath, compseal);
//		if (!compsealFile.exists()) {
//			boolean create = SealUtil.createSimpleCircleSeal(name, compsealFile.getAbsolutePath());
//			if (!create) {
//				return errorParamSmartResult();
//			}
//		}
//		try {
//			FileUtil.downloadFile("http://106.15.45.132:7755"+"/gz/" + compseal, path+":/", 2, "ZDD");
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//		return SmartResult.success();
//	}
//}
